home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iTrade.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  6KB  |  220 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // iTrade.h
  5. //
  6. // Pog header file for the iTrade package.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header:
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(iTrade);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "itrade" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24. #else
  25.  
  26. // Dependencies ///////////////////////////////////////////////////////////////
  27.  
  28. uses iFaction;
  29.  
  30. // Type definitions ///////////////////////////////////////////////////////////
  31.  
  32. //
  33. // htrade
  34. //
  35. // Handle type for trading - represents an opportunity for a trade.
  36. //
  37. handle htrade : hobject;
  38.  
  39. // Function prototypes ////////////////////////////////////////////////////////
  40.  
  41. //
  42. // htrade iTrade.Cast( hobject trade_object )
  43. //
  44. // Cast an object handle up to a handle to a trade opportunity.
  45. //
  46. prototype htrade iTrade.Cast( hobject trade_object );
  47.  
  48. //
  49. // iTrade.CreateTradeForCargoType( hfaction offering_faction,
  50. //                                   int cargo_type_offered,
  51. //                                   int num_offered,
  52. //                                   int cargo_type_wanted,
  53. //                                   int num_wanted,
  54. //                                   int offers )
  55. //
  56. // Create a trade. The trade is offered by the given faction, and consists of
  57. // an offer of a given number of a given cargo in exchange for a given number
  58. // of another cargo. Finally, how many times can this trade be taken advantage
  59. // of.
  60. //
  61. prototype htrade iTrade.CreateTradeForCargoType( 
  62.     hfaction offering_faction,
  63.     int cargo_type_offered,
  64.     int num_offered,
  65.     int cargo_type_wanted,
  66.     int num_wanted,
  67.     int offers );
  68.  
  69. //
  70. // iTrade.CreateTradeForCargoCategory( hfaction offering_faction,
  71. //                                       int cargo_type_offered,
  72. //                                       int num_offered,
  73. //                                       int cargo_category_wanted,
  74. //                                       int num_wanted,
  75. //                                       int offers )
  76. //
  77. // Create a trade. The trade is offered by the given faction, and consists of
  78. // an offer of a given number of a given cargo in exchange for a given number
  79. // of any cargo from the given cargo category.
  80. //
  81. // The final parameter determines whether or not this trade should be a one-off
  82. // trade - that is to say a trade which can only be taken up once. Finally, how 
  83. // many times can this trade be taken advantage of.
  84. //
  85. prototype htrade iTrade.CreateTradeForCargoCategory( 
  86.     hfaction offering_faction,
  87.     int cargo_type_offered,
  88.     int num_offered,
  89.     int cargo_category_wanted,
  90.     int num_wanted,
  91.     int offers );
  92.  
  93. //
  94. // iTrade.CreateTradeForCargoSuperSet( hfaction offering_faction,
  95. //                                       int cargo_type_offered,
  96. //                                       int num_offered,
  97. //                                       int cargo_super_set_wanted,
  98. //                                       int num_wanted,
  99. //                                       int offers )
  100. //
  101. // Create a trade. The trade is offered by the given faction, and consists of
  102. // an offer of a given number of a given cargo in exchange for a given number
  103. // of any cargo from the given cargo super-set.
  104. //
  105. // The final parameter determines whether or not this trade should be a one-off
  106. // trade - that is to say a trade which can only be taken up once. Finally, 
  107. // how many times can this trade be taken advantage of.
  108. //
  109. prototype htrade iTrade.CreateTradeForCargoSuperSet( 
  110.     hfaction offering_faction,
  111.     int cargo_type_offered,
  112.     int num_offered,
  113.     int cargo_super_set_wanted,
  114.     int num_wanted,
  115.     int offers );
  116.  
  117. //
  118. // int iTrade.NumOffers( htrade trade )
  119. //
  120. // How many times can the player take advantage of this trade?
  121. //
  122. prototype int iTrade.NumOffers( htrade trade );
  123.  
  124. //
  125. // iTrade.OfferTrade( htrade trade )
  126. //
  127. // Offer the given trade to the player.
  128. //
  129. prototype iTrade.OfferTrade( htrade trade );
  130.  
  131. //
  132. // iTrade.RemoveTrade( htrade trade )
  133. //
  134. // Remove the given trade from the player's current trade opportunities.
  135. //
  136. prototype iTrade.RemoveTrade( htrade trade );
  137.  
  138. //
  139. // int iTrade.NumTrades()
  140. //
  141. // How many trades are currently being offered to the player.
  142. //
  143. prototype int iTrade.NumTrades();
  144.  
  145. //
  146. // htrade iTrade.NthTrade( int n )
  147. //
  148. // Get the nth trade in the list of trades currently being offered to the 
  149. // player.
  150. //
  151. prototype htrade iTrade.NthTrade( int n );
  152.  
  153. //
  154. // hfaction iTrade.Faction( htrade trade )
  155. //
  156. // Get the faction
  157. //
  158. prototype hfaction iTrade.Faction( htrade trade );
  159.  
  160. //
  161. // string iTrade.Offered( htrade trade )
  162. //
  163. // Get the name of the offered trade commodity.
  164. //
  165. prototype string iTrade.Offered( htrade trade );
  166.  
  167. //
  168. // string iTrade.Wanted( htrade trade )
  169. //
  170. // Get the name of the wanted trade commodity, category or super set.
  171. //
  172. prototype string iTrade.Wanted( htrade trade );
  173.  
  174. //
  175. // iTrade.CanSatisfyTrade
  176. //
  177. // Can the player satisfy the given trade?
  178. //
  179. prototype bool iTrade.CanSatisfyTrade( htrade trade );
  180.  
  181. //
  182. // bool iTrade.PerformTrade( htrade trade )
  183. //
  184. // Action the given trade
  185. //
  186. prototype bool iTrade.PerformTrade( htrade trade );
  187.  
  188. //
  189. // string iTrade.JaffsTradeDescription( htrade trade )
  190. //
  191. // Update Jaffs box with a description of the trade
  192. //
  193. prototype string iTrade.JaffsTradeDescription( htrade trade );
  194.  
  195. //
  196. // string iTrade.JaffsTradeAdvice( htrade trade )
  197. //
  198. // Update Jaffs box with information about the trade
  199. //
  200. prototype string iTrade.JaffsTradeAdvice( htrade trade );
  201.  
  202.  
  203.  
  204.  
  205. ////
  206. //    MetatypeOfTrade
  207. //
  208. //    Return an int indicating the metatype of a trade.
  209. //
  210. //    0 Type
  211. //    1 Category
  212. //    2 Superset
  213.  
  214. prototype int iTrade.MetatypeOfTrade( htrade trade);
  215.  
  216.  
  217. // EOF ////////////////////////////////////////////////////////////////////////
  218.  
  219. #endif // FLUX_LIB
  220.